package com.spic.business.plan.drill.service.impl;

import java.util.List;
import com.spic.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spic.business.plan.drill.mapper.PlanDrillProblemRectificationMapper;
import com.spic.business.plan.drill.domain.PlanDrillProblemRectification;
import com.spic.business.plan.drill.service.IPlanDrillProblemRectificationService;

/**
 * 应急预案演练问题整改Service业务层处理
 * 
 * @author renxiang
 * @date 2021-10-31
 */
@Service
public class PlanDrillProblemRectificationServiceImpl implements IPlanDrillProblemRectificationService 
{
    @Autowired
    private PlanDrillProblemRectificationMapper planDrillProblemRectificationMapper;

    /**
     * 查询应急预案演练问题整改
     * 
     * @param id 应急预案演练问题整改主键
     * @return 应急预案演练问题整改
     */
    @Override
    public PlanDrillProblemRectification selectPlanDrillProblemRectificationById(Long id)
    {
        return planDrillProblemRectificationMapper.selectPlanDrillProblemRectificationById(id);
    }

    /**
     * 查询应急预案演练问题整改列表
     * 
     * @param planDrillProblemRectification 应急预案演练问题整改
     * @return 应急预案演练问题整改
     */
    @Override
    public List<PlanDrillProblemRectification> selectPlanDrillProblemRectificationList(PlanDrillProblemRectification planDrillProblemRectification)
    {
        return planDrillProblemRectificationMapper.selectPlanDrillProblemRectificationList(planDrillProblemRectification);
    }

    /**
     * 新增应急预案演练问题整改
     * 
     * @param planDrillProblemRectification 应急预案演练问题整改
     * @return 结果
     */
    @Override
    public int insertPlanDrillProblemRectification(PlanDrillProblemRectification planDrillProblemRectification)
    {
        planDrillProblemRectification.setCreateTime(DateUtils.getNowDate());
        return planDrillProblemRectificationMapper.insertPlanDrillProblemRectification(planDrillProblemRectification);
    }

    /**
     * 修改应急预案演练问题整改
     * 
     * @param planDrillProblemRectification 应急预案演练问题整改
     * @return 结果
     */
    @Override
    public int updatePlanDrillProblemRectification(PlanDrillProblemRectification planDrillProblemRectification)
    {
        planDrillProblemRectification.setUpdateTime(DateUtils.getNowDate());
        return planDrillProblemRectificationMapper.updatePlanDrillProblemRectification(planDrillProblemRectification);
    }

    /**
     * 批量删除应急预案演练问题整改
     * 
     * @param ids 需要删除的应急预案演练问题整改主键
     * @return 结果
     */
    @Override
    public int deletePlanDrillProblemRectificationByIds(Long[] ids)
    {
        return planDrillProblemRectificationMapper.deletePlanDrillProblemRectificationByIds(ids);
    }

    /**
     * 删除应急预案演练问题整改信息
     * 
     * @param id 应急预案演练问题整改主键
     * @return 结果
     */
    @Override
    public int deletePlanDrillProblemRectificationById(Long id)
    {
        return planDrillProblemRectificationMapper.deletePlanDrillProblemRectificationById(id);
    }
}
